// @flow
import configure, { sagaMiddleware } from './configure';
import modules from './modules'; // 引用具体reducer模块
// import type { Auth } from './modules/auth';
// import type { User } from './modules/user';
// import type { Base } from './modules/base';
// import type { Write } from './modules/write';
// import type { Things } from './modules/things';
import { RootSaga as commonSaga, type Common } from './modules/common';

const store = configure();
// then run the saga
modules.sagas.map(item => {
    sagaMiddleware.run(item);
});

export default store;

export type State = {
    common: Common
};
